#include <iostream>
#include "List.h"

int main()
{
  {
    List<int> lst;
    lst.push_back(5);
    lst.push_back(4);
    lst.push_back(3);
    lst.push_back(2);
    lst.push_back(1);
    lst.view_list();
    //std::cout << lst.search_node(2) << std::endl;
    //lst.delete_by_pos(5);
    //lst.delete_by_key(3);
    //lst.view_list();
    if (!lst.is_sort())
      lst.sort();
    lst.view_list();
    std::cout << lst.size() << std::endl;

    List<int> lst2(lst);
    lst2.view_list();
    List<int> lst3;
    for (int i = 0; i < 20; ++i)
      lst3.push_back(i);
    lst3.view_list();
    lst2 = lst3;
    lst2.view_list();
  }
  if (_CrtDumpMemoryLeaks())
    std::cout << "Oooooopsssss..." << std::endl;
  else
    std::cout << "No leaks :)" << std::endl;


  return 0;
}